#include <stdio.h>

int main(void)
{
	FILE *fp;
	char *s[3] = {"google", "baidu", "yahoo"}, t[3][10];
	int i;

	fp = fopen("info.txt", "w");
	for (i = 0; i < 3; i++)
	{
		fputs(s[i], fp);
		fputc('\n', fp);
	}
	fclose(fp);

	fp = fopen("info.txt", "r");
	for (i = 0; i < 3; i++)
	{
		fgets(t[i], 10, fp);
		printf("%d",s[i]);
	}
	fclose(fp);

	return 0;
}